<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>部门管理</title>
	<%@ include file="/WEB-INF/include/include.jsp" %>
	<script type="text/javascript" src="<%=path %>/js/sysmgr/org/org.js"></script>
  </head>
  <body>
  		<div class="listpage-locked-content">
			<h2 class="listpage-lk-title" >部门管理</h2>
			<div class="listpage-lk-search" id="searchWrap" ></div>			
			<div class="listpage-lk-tbar" id="tbarWrap"></div>
		</div>
		<div class="ltrgpage-content" id="pagecontent"></div>
<ui:page>

  	<ui:model name="GrildOrgModel">
  		 <x:attr name="fields" type="array">
  			<ui:model.field name="ORG_ID"   ></ui:model.field>
  			<ui:model.field name="ORG_FULL_NAME"  ></ui:model.field>
  			<ui:model.field name="ORG_SIMPLE_NAME"  ></ui:model.field>
  			<ui:model.field name="ORG_PARENT_ID"  ></ui:model.field>
  			<ui:model.field name="ORG_ORDER"  ></ui:model.field>
  			<ui:model.field name="C_STATUS"   ></ui:model.field>
  			<ui:model.field name="C_REMARK"   ></ui:model.field>
  		</x:attr>
  	</ui:model>

  	<ui:model name="TreeOrgModel">
  		 <x:attr name="fields" type="array">
  			<ui:model.field mapping="ORG_ID" name="id"  ></ui:model.field>
  			<ui:model.field mapping="ORG_FULL_NAME"  name="text"></ui:model.field>
  		</x:attr>
  	</ui:model>

	<ui:b_toolbar menuCode="menuOrg" id="toolbar" renderTo="tbarWrap" ></ui:b_toolbar>
	<ui:quicksearch handler="OrgList.quickSearch" scope="OrgList" renderTo="searchWrap"></ui:quicksearch>
	
	<ui:searchform id="orgSearchForm">
		<x:items>
			<ui:formPanel.text id="ORG_FULL_NAME" fieldLabel="全称包含" config="true"></ui:formPanel.text>
			<ui:formPanel.text id="ORG_SIMPLE_NAME" fieldLabel="简称包含" config="true"></ui:formPanel.text>
			<ui:formPanel.text id="C_REMARK" fieldLabel="备注包含" config="true"></ui:formPanel.text>
			<ui:formPanel.comboxstatic id="C_STATUS" fieldLabel="状态" data="[['1','启用'],['0','停用']]" config="true"></ui:formPanel.comboxstatic>
		</x:items>
	</ui:searchform>
	
	<ui:advSearchWindow searchFormId="orgSearchForm" id="advSearchWin" 
		searchHandlerscope="OrgList" searchHandler="OrgList.advSearch" 
		height="240" width="300"/>	
	
	<ui:panel layout="border" renderTo="pagecontent" width="1000" height="460">
		<x:items>
			<ui:tree id="orgTree"  datasetName="OrgDataSetHandler"  width="200" title="组织部门"
				model="TreeOrgModel" handlerName="OrgQueryHandler"  config="true"
				handlerMethod="getChildren"    >
				<x:attr name="region" type="string">west</x:attr>
				<x:listeners>
					<x:handler name="itemclick" funcName="OrgList.itemclick"></x:handler>
				</x:listeners>
			</ui:tree>

			<ui:grid id="orgGrid"  config="true"  showPaging="false"
				conditions='[{fieldName:\'node\',value:\'0\'}]'
				datasetName="OrgDataSetHandler" 
				model="GrildOrgModel" 
				handlerName="OrgQueryHandler" 
				handlerMethod="getChildren"   >
				<x:attr name="region" type="string">center</x:attr>
				<x:attr name="columnLines">true</x:attr>
				<x:columns>
					<ui:gridcolumn dataIndex="ORG_ID" hidden="true" ></ui:gridcolumn>
					<ui:gridcolumn dataIndex="ORG_PARENT_ID" hidden="true"/>
					<ui:gridcolumn text="序号" dataIndex="ORG_ORDER"/>
					<ui:gridcolumn text="部门全称" dataIndex="ORG_FULL_NAME"/>
					<ui:gridcolumn text="部门简称" dataIndex="ORG_SIMPLE_NAME"/>
					<ui:gridcolumn text="状态" dataIndex="C_STATUS" renderer="OrgList.statusRender"  />
					<ui:gridcolumn text="备注" dataIndex="C_REMARK"/>
				</x:columns>
			</ui:grid>
			
		</x:items>
	</ui:panel>

</ui:page>

  </body>
</html>
